package com.example.shengyin.entity;


import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.NotNull;
import javax.validation.constraints.Pattern;

@Data
@ApiModel("地区类")
public class City {

    @ApiModelProperty("编号")
    private Long id;

    @NotNull(message = "编码不能为空")
    @Pattern(regexp = "^[a-z]+$",message = "请输入正确的编码！")
    @ApiModelProperty("编码")
    private String code;

    @ApiModelProperty("名称")
    private String name;

    @ApiModelProperty("上级")
    private Long parentid;

    @ApiModelProperty("经纬度")
    private String pos;

    @ApiModelProperty("上级名称")
    private String shangji;
}
